package st.business.tepth.business.driverinfo;

import android.support.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;

import java.util.List;

import st.business.tepth.R;
import st.business.tepth.business.bean.DriverWorkRecordBean;

/**
 * @author zhangyu
 * @date 2019/2/28
 */
public class DriverWorkRecordAdapter extends BaseQuickAdapter<DriverWorkRecordBean, BaseViewHolder> {
    public DriverWorkRecordAdapter(int layoutResId, @Nullable List<DriverWorkRecordBean> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, DriverWorkRecordBean item) {
        helper.setText(R.id.tv_date, item.getDate());
        helper.setText(R.id.tv_state, item.getState());
        helper.setText(R.id.tv_bus_number, item.getBusNo());
        helper.setText(R.id.tv_work_type, item.getType());
        helper.setText(R.id.tv_work_group, item.getGroup());
        helper.addOnClickListener(R.id.tv_operation);
//        helper.setText(R.id.tv_bus_number,item.get());
//        helper.setText(R.id.tv_work_type,item.getWorkType());
//        helper.setText(R.id.tv_work_group,item.getWorkGroup());
    }
}
